library(tipr)

############# SENSITIVITY ANALYSIS FOR POSSIBLY UNMEASURED CONFOUNDERS

#### BINARY
# NIBRS MATCHED
tip_or_with_binary(effect_observed=0.871, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.60, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.871, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.871, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.75, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.871, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.871, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.80, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.871, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.85, or_correction=TRUE)

# NIBRS UNMATCHED
tip_or_with_binary(effect_observed=0.842, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.60, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.842, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.842, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.75, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.842, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.842, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.80, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.842, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.85, or_correction=TRUE)


# MAP MATCHED
tip_or_with_binary(effect_observed=0.835, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.60, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.835, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.835, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.75, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.835, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.835, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.80, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.835, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.85, or_correction=TRUE)


# MAP UNMATCHED
tip_or_with_binary(effect_observed=0.740, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.60, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.740, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.740, exposed_confounder_prev=0.80, unexposed_confounder_prev=0.75, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.740, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.70, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.740, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.80, or_correction=TRUE)
tip_or_with_binary(effect_observed=0.740, exposed_confounder_prev=0.90, unexposed_confounder_prev=0.85, or_correction=TRUE)

########### CONTINUOUS

# NIBRS MATCHED
tip_or(effect_observed=0.871, exposure_confounder_effect=0.05, or_correction=TRUE)
tip_or(effect_observed=0.871, exposure_confounder_effect=0.10, or_correction=TRUE)
tip_or(effect_observed=0.871, exposure_confounder_effect=0.15, or_correction=TRUE)
tip_or(effect_observed=0.871, exposure_confounder_effect=0.20, or_correction=TRUE)
tip_or(effect_observed=0.871, exposure_confounder_effect=0.25, or_correction=TRUE)

# NIBRS UNMATCHED
tip_or(effect_observed=0.842, exposure_confounder_effect=0.05, or_correction=TRUE)
tip_or(effect_observed=0.842, exposure_confounder_effect=0.10, or_correction=TRUE)
tip_or(effect_observed=0.842, exposure_confounder_effect=0.15, or_correction=TRUE)
tip_or(effect_observed=0.842, exposure_confounder_effect=0.20, or_correction=TRUE)
tip_or(effect_observed=0.842, exposure_confounder_effect=0.25, or_correction=TRUE)


# MAP MATCHED
tip_or(effect_observed=0.835, exposure_confounder_effect=0.05, or_correction=TRUE)
tip_or(effect_observed=0.835, exposure_confounder_effect=0.10, or_correction=TRUE)
tip_or(effect_observed=0.835, exposure_confounder_effect=0.15, or_correction=TRUE)
tip_or(effect_observed=0.835, exposure_confounder_effect=0.20, or_correction=TRUE)
tip_or(effect_observed=0.835, exposure_confounder_effect=0.25, or_correction=TRUE)


# MAP UNMATCHED
tip_or(effect_observed=0.740, exposure_confounder_effect=0.05, or_correction=TRUE)
tip_or(effect_observed=0.740, exposure_confounder_effect=0.10, or_correction=TRUE)
tip_or(effect_observed=0.740, exposure_confounder_effect=0.15, or_correction=TRUE)
tip_or(effect_observed=0.740, exposure_confounder_effect=0.20, or_correction=TRUE)
tip_or(effect_observed=0.740, exposure_confounder_effect=0.25, or_correction=TRUE)

